package com.common.aliyun.sms;

import com.common.aliyun.sms.properties.SmsProperties;
import com.common.aliyun.sms.template.SmsTemplate;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @author zhengzg
 * @create 2023-09-18 9:28
 */
@Configuration
@EnableAutoConfiguration
public class SmsAutoProperties {

    @Resource
    private SmsProperties smsProperties;

    @Bean
    public SmsTemplate smsTemplate() {
        return new SmsTemplate(smsProperties);
    }
}
